const app = getApp();

Page({
  data: {
    charts: [{
      id: 'bar',
      name: '柱状图'
    }, {
      id: 'scatter',
      name: '散点图'
    }, {
      id: 'line',
      name: '折线图'
    }],
    chartsWithoutImg: [{
      id: 'multiCharts',
      name: '一个页面中多个图表'
    }, {
      id: 'saveCanvas',
      name: '保存 Canvas 到本地文件'
    }]
  },

  onReady() {
  },

  open: function (e) {
    console.log(e.target.dataset.chart.id)
    wx.navigateTo({
      url: '/pages/echarts/' + e.target.dataset.chart.id + '/'+e.target.dataset.chart.id
    });
  }
});
